<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePicRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pic_records', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('user_id')->index();
            $table->string('first_image')->nullable()->comment('第一张图');
            $table->string('second_image')->nullable()->comment('第二张图');
            $table->unsignedInteger('parent_user_id')->default(0)->comment('配合的用户ID');
            $table->integer('type')->default(0)->comment('类型');
            $table->boolean('is_show')->default(0);

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pic_records');
    }
}
